package com.etc.library.service.impl;

import com.etc.library.dao.CategoryMapper;
import com.etc.library.pojo.Category;
import com.etc.library.service.CategoryService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

@Service
public class CategoryServiceImpl implements CategoryService {


    @Autowired
    private CategoryMapper categoryMapper;

    @Override
    public List<Category> list(Map<String,Object> params) {
        return categoryMapper.list(params);
    }

    @Override
    public boolean add(Category category) {
        return categoryMapper.add(category)>0;
    }

    @Override
    public boolean update(Category category) {
        return categoryMapper.update(category)>0;
    }

    @Override
    public boolean del(Category category) {
        return categoryMapper.update(category)>0;
    }
}
